//
//  VEAssionUserTableViewCell.m
//  VEMoneyPorject
//
//  Created by BlueWind on 2018/9/14.
//  Copyright © 2018年 陈建. All rights reserved.
//

#import "VEAssionUserTableViewCell.h"

@implementation VEAssionUserTableViewCell

/** 返回循环利用的cell */
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self= [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self loadDefaultSetting];
    }
    return self;
}

/** 加载默认UI元素和需要的数据 */
- (void)loadDefaultSetting {
    
    
    for (NSInteger index = 0; index < 16; index++) {
        
        NSInteger row = index/7;
        NSInteger lin = index % 7;
        CGFloat width = 40;
        
        CGFloat sp = (SCREEN_WIDTH - width * 7)/8;
        
        
        UIImageView *image = [UIImageView new];
        [self.contentView addSubview:image];
        [image mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView).offset(GAP15 * (row + 1) + width * row);
            make.left.equalTo(self.contentView).offset(sp * (lin + 1) + width * lin);
            make.size.mas_equalTo(CGSizeMake(width, width));
        }];
        image.contentMode = UIViewContentModeScaleAspectFill;
        image.clipsToBounds = YES;
        image.image = [UIImage imageNamed:@"First_PlaceHolder"];
        [image setLayerCornerRadius:20];

    }
    
}

@end
